<template>
      <form-custom-control :id="componentConfig.id" :charBoardAppId="config.appId" :item="componentConfig" :ref="componentConfig.id" :readonly="true"></form-custom-control>
</template>

<script>
import FormCustomPublic from "@/views/modules/form/FormCustomView/components/FormCustomPublic";
import InsPortalDefApi from "@/common/api/portal/insPortalDef";
import FormCustomControl from "@/views/modules/form/FormCustomView/GridLayoutView/FormCustomControl.vue";

export default {
  name: "ChartBoardView",
  mixins: [FormCustomPublic],
    components:{
        FormCustomControl
    },
  props: {
    portalId: {}
  },
  data() {
    return {
      componentConfig:{}
    }
  },
  created(){
    this.init();
  },
  methods:{
    init(){
      let  alias = ''
      let {pageAlias,appId,moduleId} = this.config;
      let self=this;
        if(self.config.alias){
            alias = self.config.alias
        }
      InsPortalDefApi.getCustomComponent(pageAlias,appId,alias,moduleId).then(res=>{
        self.componentConfig = res;
      })
    }
  }
}
</script>

<style scoped>

</style>
